#include<stdio.h>
#include<stdlib.h>
int main()
{
int i,j,k;
int key;
int a[10]={3,5,6,2,4,8,7,1,9,2};
for(i=1;i<10;i++)
{
key=a[i];
j=i-1;
while(j>=0&&a[j]>key)
{
a[j+1]=a[j];
j=j-1;
}
a[j+1]=key;
}
for(i=0;i<10;i++) printf("%d ",a[i]);
return 0;
}
